#ifndef _OBSERVER_H_
#define _OBSERVER_H_

#include "subject.h"
#include <string>

using std::string;

class Subject;

class Observer
{
public:
	virtual ~Observer();
	virtual void Update(Subject*) = 0;
	virtual string GetName();

protected:
	Observer(string name);

protected:
	string name_;
};

class ConcreteObserverA : public Observer
{
public:
	ConcreteObserverA(string name);
	~ConcreteObserverA();

	virtual void Update(Subject*);
};

class ConcreteObserverB : public Observer
{
public:
	ConcreteObserverB(string name);
	~ConcreteObserverB();

	virtual void Update(Subject*);
};

#endif // _OBSERVER_H_